call-with-current-continuation


(call-with-current-continuationproc) procedure
$\Longrightarrow$ value-of-proc

The procedure call-with-current-continuation packages up the current continuation as an ``escape procedure'' and passes it as an argument to procedure. procedure must be a procedure of one argument. The escape procedure is an n-ary procedure, which if later invoked with zero or more arguments, will ignore whatever continuation is in effect at that later time and will instead pass the arguments to whatever continuation was in effect at the time the escape procedure was created.

The escape procedure created by call-with-current-continuation has unlimited extent just like any other procedure. It may be stored in variables or data structures and may be called as many times as desired. For a more thorough explanation consult the 3̊rs.